<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>FlyShop开源商城系统 - FlyShop开源电子商务平台</title>
    <meta name='keywords' content='开源商城系统,开源网店系统,开源电子商务,商城系统源码,多用户商城源码'>
    <meta name='description' content='FlyShop是基于Java开发b2c2c开源多用户商城系统,支持商家入驻,支持微商城,手机移动商城,APP商城多为一体的电子商务系统'>
    <link rel="stylesheet" href="/assets/admin-lte/css/admin.css" />
    <!--[if lt IE 9]>
    <script src="/assets/js/html5shiv.min.js"></script>
    <script src="/assets/js/respond.min.js"></script>
    <![endif]-->
    <meta name="robots" content="noindex,nofollow">
    <link rel="shortcut icon" href="/assets/favicon.ico" />
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/jquery/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artdialog/artDialog.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artdialog/plugins/iframeTools.js"></script>
    <link rel="stylesheet" type="text/css" href="/assets/js/vendors/artdialog/skins/aero.css" />
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/autovalidate/validate.js"></script>
    <link rel="stylesheet" type="text/css" href="/assets/js/vendors/autovalidate/style.css" />
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artTemplate/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artTemplate/artTemplate-plugin.js"></script>
    <script type='text/javascript' src="/assets/js/vendors/bootstrap/js/bootstrap.min.js"></script>
    <script type='text/javascript' src="/assets/admin-lte/js/adminlte.min.js"></script>
</head>
<body class="skin-blue fixed sidebar-mini" style="height: auto; min-height: 100%;">
<div class="wrapper" style="height: auto; min-height: 100%;">
    <header class="main-header">
        <div class="logo">
            <span class="logo-mini"><b>iWeb</b></span>
            <span class="logo-lg"><b>iWebShop</b>后台管理</span>
        </div>
        <nav class="navbar navbar-static-top">
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only"></span>
            </a>

            <!--顶部菜单 开始-->
            <div id="menu" class="navbar-custom-menu">
                <ul class="nav navbar-nav" name="topMenu">
                    <li><a hidefocus="true" href="/goods/goods_list">商品</a></li>
                    <li><a hidefocus="true" href="/member/member_list">会员</a></li>
                    <li><a hidefocus="true" href="/order/order_list">订单</a></li>
                    <li><a hidefocus="true" href="/market/pro_rule_list">营销</a></li>
                    <li><a hidefocus="true" href="/market/user_reg">统计</a></li>
                    <li><a hidefocus="true" href="/system/default">系统</a></li>
                    <li><a hidefocus="true" href="/tools/db_bak">工具</a></li>
                    <li><a hidefocus="true" href="/plugins/plugin_list">插件</a></li>
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
            <!--顶部菜单 结束-->
        </nav>
    </header>

    <!--左侧菜单 开始-->
    <aside id="admin_left" class="main-sidebar">
        <section class="sidebar" style="height: auto;">
            <div class="user-panel">
                <div class="pull-left image">
                    <i class="fa fa-user"></i>
                </div>
                <div class="pull-left info">
                    <p>admin</p>
                    <a href="#">超级管理员</a>
                </div>
            </div>

            <ul class="sidebar-menu tree" data-widget="tree">
                <li class="header">系统模块菜单</li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="后台首页"></i>
                        <span>后台首页</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/default"><i class="fa fa-circle-o"></i>首页</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="网站管理"></i>
                        <span>网站管理</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/conf_base"><i class="fa fa-circle-o"></i>网站设置</a></li>
                        <li><a href="/system/conf_guide"><i class="fa fa-circle-o"></i>网站导航</a></li>
                        <li><a href="/system/conf_banner"><i class="fa fa-circle-o"></i>首页幻灯图</a></li>
                        <li><a href="/system/conf_ui/type/site"><i class="fa fa-circle-o"></i>网站前台主题</a></li>
                        <li><a href="/system/conf_ui/type/system"><i class="fa fa-circle-o"></i>后台管理主题</a></li>
                        <li><a href="/system/conf_ui/type/seller"><i class="fa fa-circle-o"></i>商家管理主题</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="支付管理"></i>
                        <span>支付管理</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/payment_list"><i class="fa fa-circle-o"></i>支付方式</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="第三方平台"></i>
                        <span>第三方平台</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/oauth_list"><i class="fa fa-circle-o"></i>oauth登录列表</a></li>
                        <li><a href="/system/hsms"><i class="fa fa-circle-o"></i>手机短信平台</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="配送管理"></i>
                        <span>配送管理</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/delivery"><i class="fa fa-circle-o"></i>配送方式</a></li>
                        <li><a href="/system/freight_list"><i class="fa fa-circle-o"></i>物流公司</a></li>
                        <li><a href="/system/takeself_list"><i class="fa fa-circle-o"></i>自提点列表</a></li>
                        <li><a href="/system/takeself_edit"><i class="fa fa-circle-o"></i>添加自提点</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="地域管理"></i>
                        <span>地域管理</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/area_list"><i class="fa fa-circle-o"></i>地区列表</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa" name="ico" menu="权限管理"></i>
                        <span>权限管理</span>
                        <span class="pull-right-container">
								<i class="fa fa-angle-left pull-right"></i>
							</span>
                    </a>
                    <ul class="treeview-menu" name="leftMenu">
                        <li><a href="/system/admin_list"><i class="fa fa-circle-o"></i>管理员</a></li>
                        <li><a href="/system/role_list"><i class="fa fa-circle-o"></i>角色</a></li>
                        <li><a href="/system/right_list"><i class="fa fa-circle-o"></i>权限资源</a></li>
                    </ul>
                </li>

                <li class="header">快速导航</li>
                <li><a href="fdfdsf"><i class="fa fa-star-o"></i> <span>aaa</span></a></li>
            </ul>
        </section>
    </aside>
    <!--左侧菜单 结束-->

    <!--右侧内容 开始-->
    <div id="admin_right" class="content-wrapper">
        <script type="text/javascript" charset="UTF-8" src="/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
        <div class="breadcrumbs" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="home-icon fa fa-home"></i>
                    <a href="#">系统</a>
                </li>
                <li>
                    <a href="#">网站管理</a>
                </li>
                <li class="active">网站导航</li>
            </ul>
        </div>

        <div class="content">
            <form action='/system/guide_update' method='post'>
                <table class="table list-table" id='guide_box'>
                    <colgroup>
                        <col width="250px" />
                        <col width="350px" />
                        <col width="220px" />
                    </colgroup>
                    <thead>
                    <tr>
                        <th>名称</th>
                        <th>链接地址</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody></tbody>

                    <!--导航行模板-->
                    <script type='text/html' id='guideTrTemplate'>
                        <tr>
                            <td>
                                <input type='text' name='guide_name[]' class='form-control' value='<%=name%>' pattern='required' alt='请填写导航名' />
                            </td>
                            <td>
                                <input type='text' name='guide_link[]' class='form-control' value='<%=link%>' pattern='required' alt='请填写URL，如：http://www.aircheng.com' />
                            </td>
                            <td>
                                <a href="javascript:;"><i class='operator fa fa-arrow-up' alt='向上' title='向上'></i></a>
                                <a href="javascript:;"><i class='operator fa fa-arrow-down' alt='向下' title='向下'></i></a>
                                <a href="javascript:;"><i class='operator fa fa-close' alt='删除' title='删除'></i></a>
                            </td>
                        </tr>
                    </script>

                    <tfoot>
                    <tr>
                        <td colspan="3">
                            <button type="button" class="btn btn-primary" onclick="add_guide();">新加一个</button>
                            <button type="button" disabled class="btn btn-primary">禁止修改</button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </form>
        </div>

        <script type='text/javascript'>
            //DOM加载完毕
            $(function(){
                //生成导航
                var guideList = [{"order":"0","name":"官网首页","link":"http:\/\/www.aircheng.com"},{"order":"1","name":"商家列表","link":"site\/seller"},{"order":"2","name":"后台管理","link":"admin\/index"},{"order":"3","name":"商家管理","link":"seller\/index"}];
                for(var index in guideList)
                {
                    add_guide(guideList[index]);
                }
            });

            //添加导航
            function add_guide(data)
            {
                var data = data ? data : {};
                var guideTrHtml = template.render('guideTrTemplate',data);
                $('#guide_box tbody').append(guideTrHtml);
                var last_index = $('#guide_box tbody tr').size()-1;
                buttonInit(last_index);
            }

            //操作按钮绑定
            function buttonInit(indexValue,ele)
            {
                ele = ele || "#guide_box";
                if(indexValue == undefined || indexValue === '')
                {
                    var button_times = $(ele+' tbody tr').length;

                    for(var item=0;item < button_times;item++)
                    {
                        buttonInit(item,ele);
                    }
                }
                else
                {
                    var obj = $(ele+' tbody tr:eq('+indexValue+') .operator')

                    //功能操作按钮
                    obj.each(
                        function(i)
                        {
                            switch(i)
                            {
                                //向上排序
                                case 0:
                                {
                                    $(this).click(
                                        function()
                                        {
                                            var insertIndex = $(this).parent().parent().parent().prev().index();
                                            if(insertIndex >= 0)
                                            {
                                                $(ele+' tbody tr:eq('+insertIndex+')').before($(this).parent().parent().parent());
                                            }
                                        }
                                    )
                                }
                                    break;

                                //向上排序
                                case 1:
                                {
                                    $(this).click(
                                        function()
                                        {
                                            var insertIndex = $(this).parent().parent().parent().next().index();
                                            $(ele+' tbody tr:eq('+insertIndex+')').after($(this).parent().parent().parent());
                                        }
                                    )
                                }
                                    break;

                                //删除排序
                                case 2:
                                {
                                    $(this).click(
                                        function()
                                        {
                                            var obj = $(this);
                                            art.dialog.confirm('确定要删除么？',function(){obj.parent().parent().parent().remove()});
                                        }
                                    )
                                }
                                    break;
                            }
                        }
                    )
                }
            }
        </script>

    </div>
    <!--右侧内容 结束-->

    <!--顶部弹出菜单 开始-->
    <aside class="control-sidebar control-sidebar-dark">
        <ul class="control-sidebar-menu">
            <li><a href="/admin/logout"><i class="fa fa-circle-o text-red"></i> 退出管理</a></li>
            <li><a href="/system/admin_repwd"><i class="fa fa-circle-o text-yellow"></i> 修改密码</a></li>
            <li><a href="/system/default"><i class="fa fa-circle-o text-green"></i> 后台首页</a></li>
            <li><a href="/" target='_blank'><i class="fa fa-circle-o text-aqua"></i> 商城首页</a></li>
            <li><a href="/system/navigation"><i class="fa fa-circle-o"></i> 快速导航</a></li>
        </ul>
    </aside>
    <!--顶部弹出菜单 结束-->
</div>
</body>
</html>